package com.ibeeking.found.common.enums.goods;

/**
 * @Author ibeeking
 * @Date: 2021-01-05 19:15
 * @Description: 商品模块
 */
public enum GoodsModuleEnum {
    // 1-实物商品 2-券 3-虚拟商品 4-虚拟商品(大码商品)
    REAL_GOODS(1),
    COUPON(2),
    VIRTUAL_GOODS(3),
    VIRTUAL_LARGE_SIZE_GOODS(4),;
    private Integer value;

    GoodsModuleEnum(int value) {
        this.value = value;
    }


    public Integer getValue() {
        return value;
    }

    public static GoodsModuleEnum getEnum(Integer value) {
        for (GoodsModuleEnum enumObj : values()) {
            if (enumObj.getValue().equals(value)) {
                return enumObj;
            }
        }
        return null;
    }
}
